//
//  User.m
//  Sydeny
//
//  Created by Rainbow on 8/14/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "User.h"


@implementation User


@synthesize userId;
@synthesize username;
@synthesize nickname;

- (void)encodeWithCoder:(NSCoder *)aCoder
{
	[aCoder encodeObject:self.userId forKey:@"userId"];
	[aCoder encodeObject:self.username forKey:@"username"];
	[aCoder encodeObject:self.nickname forKey:@"nickname"];
}

- (id)initWithCoder:(NSCoder *)aDecoder
{
	if ([self init]) {
		self.userId = [aDecoder decodeObjectForKey:@"userId"];
		self.username = [aDecoder decodeObjectForKey:@"username"];
		self.nickname = [aDecoder decodeObjectForKey:@"nickname"];
    }
	return self;
}

-(void)dealloc
{
    [userId release];
    [username release];
    [nickname release];
    [super dealloc];
}

@end
